home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.22
/
greet
/
greet.p
< prev
next >
Wrap
Text File
|
1995-04-23
|
1KB
|
75 lines
Program Gruesse;
{$Incl"Libraries/Dos.h","dos.lib"}
Const CSI = Chr($9b);
Var now : Datestamp;
std : Long;
Ps : String;
Pl : Integer;
input : Text;
Gree : String[80];
xx : p_DateStamp;
Begin
If FromWb Then
Begin
Reset(input,"CON:100/70/400/70/Grüße");
If IOResult=0 Then
Begin
output:=input;
Writeln(CSI,"33;1mGrüße V0.03",CSI,"0m © 1992 by ""Bomber"" Björn Schotte",
CSI,"0m");
Writeln;
Writeln("USAGE: Grüße <Name>");
Writeln;
Writeln("<name> : z.B. Björn Schotte ...");
Delay(150);
Close(input);
End;
End;
Gree:="";
Pl:=ParameterLen;
Ps:=ParameterStr;
{Ps[Pl+1]:=Chr(0);}
Ps := Copy(Ps,1,Pl-1);
If Pl=0 Then
Begin
Writeln(CSI,"33;1mGrüße V0.03",CSI,"0m © 1992 by ""Bomber"" Björn Schotte",
CSI,"0m");
Writeln;
Writeln("USAGE: Grüße <Name>");
Writeln;
Writeln("<name> : z.B. Björn Schotte ...");
Halt(0);
End;
{ Feststellen der Stunden: }
xx := _Datestamp(^now);
std:=now.ds_Minute Div 60;
{ Begrüßung gemäß der Tageszeit: }
If (Std>4) And (Std<=11) Then
Begin
Gree:="Guten Morgen";
End Else If (Std>11) And (Std<=18) Then
Begin
Gree:="Guten Tag";
End Else If (Std>18) And (Std<=22) Then
Begin
Gree:="Guten Abend";
End Else If (Std>22) And (Std<=4) Then
Begin
Gree:="Gute Nacht";
End;
Write(CHR(27)+"[33;1m");
Write(Gree);
Write(", "+Ps+" !");
WriteLn(CHR(27)+"[0m");
End.